package com.cy.gameserver.data;

/**
 * Created by tiankai.qin on 18/2/28.
 */
public class CommonResponse {

    public final static int CODE_SUCC = 200;
    public final static int CODE_FAILED = 200;

    private int code;
    private String msg;

    private Object data;

    public CommonResponse() {

    }

    public CommonResponse(int code, String msg) {
        this(code, msg, null);
    }


    public CommonResponse(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static CommonResponse commonSucc() {
        return new CommonResponse(CODE_SUCC, "succ");
    }
}
